﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PFMCandidate
{
   public  class CandidateFactory
    {
       private CandidateFactory(){
           
   }
       public static Candidate CreateCandidate(PFMConfigurations.Target o_Target, string sFileName, DateTime dateTime, long lsize)
       {
           int a = sFileName.LastIndexOf(@"\") + 1;
           Candidate Result=null;
           Result = new Candidate(o_Target, sFileName, dateTime, lsize) { ProcessedName=sFileName.Substring (a,sFileName.Length-a)};
           return Result;
       }
       public static Candidate CreateCandidate(string sFileName)
       {
           Candidate Result = null;
           Result = new Candidate(sFileName);
           return Result;
       }
    }
}
